package com.soyoung.config;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * 测试读取config-client-one客户端信息
 * @author: zhuhongqiang
 * @since : 2018/5/14.
 */
@Component//（把普通pojo实例化到spring容器中，相当于配置文件中的<bean id="" class=""/>）
@FeignClient(value = "config-client-one")//value是注册中心的serviceId名称
public interface OrderClient {

    @RequestMapping(value ="/user/show/{id}", method= RequestMethod.GET)
    String getbyid(@PathVariable("id") Object id);
}
